package nothing.model;

public class RecipeTime {

    private Recipe recipe;
    private int time;

    public RecipeTime(Recipe recipe, int time) {
        this.recipe = recipe;
        this.time = time;
    }

    public Recipe getRecipe() {
        return recipe;
    }

    public void setRecipe(Recipe recipe) {
        this.recipe = recipe;
    }

    public int getTime() {
        return time;
    }

    public void setTime(int time) {
        this.time = time;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final RecipeTime other = (RecipeTime) obj;
        if (this.recipe != other.recipe && (this.recipe == null || !this.recipe.equals(other.recipe))) {
            return false;
        }
        if (this.time != other.time) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 41 * hash + (this.recipe != null ? this.recipe.hashCode() : 0);
        hash = 41 * hash + this.time;
        return hash;
    }

    public String toString() {
        return "Recipe Time{" +
                "recipe=" + recipe + ", " +
                "time=" + time +
                "}";
    }
}
